/*
 * Ext JS Library 2.2
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */
Ext.ns("Extmx.tree.PropertyTree");
Extmx.tree.PropertyTree = Ext.extend(Ext.ux.tree.TreeGrid, {
	dataUrl: 'treegrid-data.json',
	textPropiedad:"Propiedad",
	textValor:"Valor",
	dataIndexPropiedad:'task',
	dataIndexValor:'user',
	widthPropiedad:120,
	widthValor:120,
	
	initComponent : function(){
        Ext.apply(this,{
            loader:new Ext.ux.tree.TreeGridLoader({
                dataUrl: this.dataUrl,
                requestMethod: this.requestMethod,
                store: this.store,
                baseParams: this.baseParams
            }),
            columns:[{
				header: this.textPropiedad,
				dataIndex: this.dataIndexPropiedad,
				width: this.widthPropiedad
			},{
				header: this.textValor,
				width: this.widthValor,
				dataIndex: this.dataIndexValor
			}]//,

			//dataUrl: this.dataUrl
        });
        Extmx.tree.PropertyTree.superclass.initComponent.apply(this, arguments);
    }
});
Ext.reg("propertytree",Extmx.tree.PropertyTree);